﻿
    using System;
    using System.Web.Services.Protocols;
using Chain.Common;
using Chain.Common.DEncrypt;
    public partial class MySelfSoapHeader : SoapHeader
    {
        private bool _serializeRequired;
        private static bool IsCanAnonymityWs = Convert.ToBoolean(DESEncrypt.Decrypt(ConfigHelper.GetValue("IsCanAnonymityWs")));
        private string name;
        private string pwd;
        private static string WebServiceName = ConfigHelper.GetValue("WebServiceName");
        private static string WebServicePwd = ConfigHelper.GetValue("WebServicePwd");

        public bool CheckUser()
        {
            return (IsCanAnonymityWs || (!(this.Name != WebServiceName) && !(this.Pwd != WebServicePwd)));
        }

        public string Name
        {
            get
            {
                return this.name;
            }
            set
            {
                this.name = value;
            }
        }

        public string Pwd
        {
            get
            {
                return this.pwd;
            }
            set
            {
                this.pwd = value;
            }
        }

        public bool SerializeRequired
        {
            get
            {
                return this._serializeRequired;
            }
            set
            {
                this._serializeRequired = value;
            }
        }
    }


